home *** CD-ROM | disk | FTP | other *** search
/ Apple Reference & Present…nuary (Partner) - Disc 2 / The Apple Reference and Presentations Library (Disc 2)(January 1994).iso / Graphisoft / US English / ArchiCAD / ArchiCAD 4.5-68K / ArchiCAD Library / 08 Doors & Windows / Window Macros / qrtr_frame < prev    next >
Text File  |  1994-04-08  |  2KB  |  76 lines

  1. !qrtr_frame   /rewritten 2/22/94/***VL/
  2. ! a, b, frame width, frame thickness,
  3. ! glass material, resolution
  4.  
  5. r=f                                 !***resolution
  6. s=90/r                           !***resolution segment angle
  7. g=1.5*c                          !***frame#2 thickn. = 0.5*frame#1 thickn.
  8. k=a-c
  9. p=a-g
  10. l=b-c
  11. q=b-g
  12. x=k-sqr(k*k-c*c)          !***frame#1 internal edge distance(-Δx)
  13. m=k-x
  14. y=p-sqr(p*p-g*g)          !***frame#2 internal edge distance(-Δx)
  15. n=p-y
  16. z=l-sqr(l*l-c*c)           !***frame#1 internal edge distance(-Δy)
  17. o=l-z
  18. t=q-sqr(q*q-g*g)          !***frame#2 internal edge distance(-Δy)
  19. i=q-t
  20. for v=r to 0 step-1
  21.     w=v*s
  22.     Put -a*cos(w), b*sin(w), 13
  23. next v
  24.     Put -c,o,15
  25. for v= r-1 to 1 step -1
  26.     w=v*s
  27.     Put -k*cos(w), l*sin(w), 13+64
  28. next v
  29.     Put -m,c,15
  30. prism_  7+nsp/3,d,         !*** external frame
  31. get (nsp/2),
  32.    -a,0,15,
  33.    0,0,15,
  34.    0,b,-1,
  35.    -c,o,15,
  36.    use (nsp),
  37.    -m,c,15,
  38.    -c,c,15,
  39.    -c,o,-1
  40.  Put -g,i,15
  41. for v= r-1 to 1 step -1
  42.     w=v*s
  43.     Put -p*cos(w), q*sin(w), 13+64
  44. next v
  45.     Put -n,g,15
  46. addz d/4
  47. prism_  7+nsp/3,d/2,     !*** internal frame
  48.    get (nsp/2),
  49.    -m,c,15,
  50.    -c,c,15,
  51.    -c,o,-1,
  52.    -g,i,15,
  53.    get (nsp),
  54.    -p,g,15,
  55.    -g,g,15,
  56.    -g,i,-1
  57. body 3
  58. if e<0.1 then 10                                   !***glass 
  59.        Put -g,i,15
  60.        for v= r-1 to 1 step -1
  61.            w=v*s
  62.            Put -p*cos(w), q*sin(w), 13+64
  63.        next v
  64.        Put -n,g,15
  65.      material e
  66.      addz d/4-0.002
  67.      prism_ 3+nsp/3,0.004,
  68.         get (nsp),
  69.         -p,g,13,
  70.         -g,g,13,
  71.         -g,i,-1
  72. body 3
  73. 10:
  74. end
  75.  
  76.